#include "World.h"

#include <core/Engine.h>

void World::draw()
{
	VisibleEntityListIterator itEntity;
	for ( itEntity = m_pVisibleEntities.begin(); itEntity != m_pVisibleEntities.end(); ++itEntity ) {
		VisibleEntity* pEntity = *itEntity;
		IRenderer* pRenderer = Engine::get()->getRenderer();
		Point* pPoint = pEntity->getPoint();
		pRenderer->beginTransformation();
			pRenderer->translate( pPoint->getPos() );
			pRenderer->rotate( pPoint->getAngle() );
			pEntity->draw( pRenderer );
		pRenderer->endTransformation();
		
	}
}
